package com.niiwoo.civet.mobile.service.bill;

import com.alibaba.dubbo.config.annotation.Reference;
import com.niiwoo.civet.trade.dto.response.intelligenceInvest.ProjectPackageResponseDTO;
import com.niiwoo.civet.trade.service.intelligenceInvest.IntelligenceInvestDubboService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Objects;

/**
 * Created by xiaoyingping on 2018/11/27.
 */
@Slf4j
@Service
public class InvokeTradeService {


    @Reference(version = "1.0.0")
    private IntelligenceInvestDubboService intelligenceInvestDubboService;


    //查询智能投信息
    public ProjectPackageResponseDTO queryProjectPackageInfo(Long packageId){
        if(Objects.isNull(packageId)){
            log.warn("packageId为空");
            return null;
        }

        ProjectPackageResponseDTO projectPackageResponseDTO = intelligenceInvestDubboService.getIntelligenceInvestInfo(packageId);
        return projectPackageResponseDTO;
    }
}
